package com.adou.demo;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class ListDemo2 {
    public static void main(String[] args) {

        List<Student> list2 = new ArrayList<>();
        List<String> list = list2.stream().map(Student::getName).collect(Collectors.toList());
        System.out.println(list);
    }
}
